//
//  SEGPublishEditCarViewModel.h
//  Commom
//
//  Created by 梁学彰 on 2020/6/5.
//

#import <Foundation/Foundation.h>
#import "SEGHouseRentalAndSaleRequestManager.h"
#import "SEGCarRentalDetailsModel.h"
#import "ReactiveObjC.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, SEGEnumPublishCarType) {
    SEGEnumPublishCarTypeZL = 0, /*租赁*/
    SEGEnumPublishCarTypeCS = 1 /*出售*/
};

@interface SEGPublishEditCarViewModel : NSObject

@property (nonatomic, strong) NSArray<NSArray*> *dataSoure;

@property (nonatomic, strong) NSMutableDictionary *requestParams;

@property (nonatomic, strong)NSArray<NSString*> *imageData;
@property (nonatomic, strong)NSIndexPath *imageDataIndexPath;
@property (nonatomic, strong)NSDictionary *selectedData;

@property (nonatomic, strong)SEGCarRentalDetailsDataModel *editModel;
@property (nonatomic, strong) NSString *regionName;

@property (nonatomic, assign) SEGEnumPublishCarType rentalType;

/**
 房屋租售主键ID 存在就表明是修改
 */
@property (nonatomic,   copy) NSString *rentalId;

- (instancetype)initWithrentalId:(NSString *)rentalId rentalType:(SEGEnumPublishCarType )rentalType;

- (RACSignal *)loadCommonAndEditData;

- (RACSignal *)sendSaveImageRequestWithPhotos:(NSArray<UIImage *> *)photos;

- (RACSignal *)sendPublishEditCarRequest;

@end

NS_ASSUME_NONNULL_END
